question

This function displays a message box on the user's screen with a title and text, as well as a yes and a no button.

double question(string title, string text)

Parameters:
title
The title of the window.
text
The text that is to be shown.

Return value:
1 for yes, 2 for no, or 0 on failure.

Remarks:
This function is useful when you want to ask the user a simple question. The script execution will pause until the user clicks on either the yes or the no button.

Example:
void main()
{
int answer = question("Question", "Would you like to open my fruit basket?");
if(answer==0)
{
alert("Wait!", "I'm afraid something went horribly wrong here!");
}
if(answer==1)
{
alert("Great!", "I'll show you in a minute, just hang on...");
}
if(answer==2)
{
alert("Oh well", "I sure don't mind, all the more for me to consume on my own.");
}
}